<%-- 
    Document   : nuevoSalario
    Created on : 21-ago-2009, 11:22:48
    Author     : Ale
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" session="false" import="domain.*, planner.*, java.util.Iterator, java.util.Set, java.util.List, java.sql.Date"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>DOMECO</title>
        <link href="style.css" rel="stylesheet" type="text/css">


    </head>
    <body>
        
        <%if (request.getSession(false) != null) {%>
        <table align="center" width="1000" >
            <tr>
                <td>
                    <div id="menu" align="center"><jsp:include page="./menu principal.jsp"></jsp:include></div>
                    <br>

                    <p id="campoAzul" align="center" valign="middle" width="235px"><span id="blanco">Salarios</span><br></p>
                    <span id="azulTitulo"> Nuevo Salario</span>
                    <div id="general">

                        <div id="cuenta" align="center" >

                            <form name="introducirCuenta" action="./Register?type=salary&redir=P1" method="post">
                                <table>
                                    <tr>
                                        <td><br></td>
                                    </tr>
                                    <tr>
                                        <td><span id="azul">Contrato:</span></td>
                                        <td><select name="elecon" id="elecon">
                                                <%
    Userdom u = (Userdom) request.getSession().getAttribute("user");
    Iterator it = new Operations().getWContrList(u).iterator();
    while (it.hasNext()) {
        Wcontract w = (Wcontract) it.next();

                                                %>
                                                <option  value="<% out.print(w.getIdWcontract());%>"><% out.print(w.getWorkName());%></option>

                                                <%
    }
                                                %>


                                        </select></td>
                                    </tr>

                                    <tr>
                                        <td><br></td>
                                    </tr>
                                    
                                    <td><span id="azul">Estado de cobro:</span></td>
                                    <td><select name="estado" id="estado">
                                    <option value="1" selected>Pendiente de cobro</option>
                                    <option value="2">Cobrado</option>
                                    
                                    </select></td>

                                    <tr>
                                        <td><br></td>
                                    </tr>
                                    <tr>
                                        <td><span id="azul">Sueldo:</span></td>
                                        <td><input name="amount" type="text" value=""/></td>
                                    </tr>

                                    <tr>
                                        <td><br></td>
                                    </tr>

                                    <tr align="center">

                                        <td><input name="aceptar" type="submit" value="" id="aceptar"></td>
                                        <td><input type="button" value="" id="atras" onclick="javascript:history.back();"></td>
                                    </tr>

                                </table>

                            </form>

                        </div>




                        <div id="barraDer">
                            <div id="accesos">
                                <table align="center">
                                    <tr ><td id="campoAzul" align="center" valign="middle" width="235px"><span id="blanco">Operaciones</span><br></td></tr>
                                </table>

                                <p align="center"><a href="./nuevaCuenta.jsp" id="colorEvento"><span onmouseover='this.style.color="#FF9900"' onmouseout='this.style.color="#79A9D9"'>A&ntilde;adir cuenta</span></a></p>
                                <p align="center"> <a href="./nuevoContLab.jsp" id="colorEvento"><span onmouseover='this.style.color="#FF9900"' onmouseout='this.style.color="#79A9D9"'>Contratos laborales</span></a> </p>

                            </div>

                            <div id="estadisticas">
                                <table align="center">
                                    <tr ><td id="campoAzul" align="center" valign="middle" width="235px"><span id="blanco">Datos actuales</span><br></td></tr>
                                </table>

                                <p align="center"><span id="naranja"><% java.util.Date fecha = new java.util.Date(); out.println(fecha.toLocaleString()); %></span> </p>

                            </div>
                        </div>
                    </div>

                    <div id="abajo" align="center"><p>&copy;   Domeco &mdash; Proyecto Informático A&ntilde;o 2009 </p></div>
                </td>
            </tr>
        </table>
        <%} else {%>
        <jsp:forward page="./index.jsp"></jsp:forward>
        <%}%>
    </body>
</html>
